home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / DTS Sample Code / Macintosh Sample Code / Disk Images / MacDTS Sample Code 89.06.image / MacDTS.Sample.Code.89.06.sit / SC.013.OOPTESample / TESampleGlue.a / TESampleGlue.a
Encoding:
Text File  |  1989-04-02  |  1.7 KB  |  66 lines  |  [TEXT/MPS ]

  1. *
  2. *    Apple Macintosh Developer Technical Support
  3. *
  4. *    MultiFinder-Aware Simple TextEdit Sample Application
  5. *
  6. *    OOPTESample
  7. *
  8. *    TESampleGlue.a        -    Assembler Source
  9. *
  10. *    Copyright © 1988, 1989 Apple Computer, Inc.
  11. *    All rights reserved.
  12. *
  13. *    Version:        
  14. *                    1.00                    04/89
  15. *
  16. *    Components:     
  17. *                    BuildOOPTESample        April 1, 1989
  18. *                    MOOPTESample.p            April 1, 1989
  19. *                    OOPTESample.make        April 1, 1989
  20. *                    TECommon.h                April 1, 1989
  21. *                    TESampleGlue.a            April 1, 1989
  22. *                    TESample.r                April 1, 1989
  23. *                    UApplication.p            April 1, 1989
  24. *                    UApplication.inc1.p        April 1, 1989
  25. *                    UDocument.p                April 1, 1989
  26. *                    UDocument.inc1.p        April 1, 1989
  27. *                    UTEDocument.p            April 1, 1989
  28. *                    UTEDocument.inc1.p        April 1, 1989
  29. *                    UTESample.p                April 1, 1989
  30. *                    UTESample.inc1.p        April 1, 1989
  31. *
  32.  
  33. ;
  34. ;    AsmClikLoop
  35. ;
  36. ;    This routine gets called by the TextEdit Manager from TEClick.
  37. ;    It calls the old, default click loop routine that scrolls the
  38. ;    text, and then calls our own Pascal routine that handles
  39. ;    tracking the scroll bars to follow along.  It doesn't bother
  40. ;    with saving registers A0 and D0, because they are trashed
  41. ;    anyway by TextEdit.
  42. ;
  43.  
  44. AsmClikLoop    PROC        EXPORT
  45.  
  46.             IMPORT        GETOLDCLIKLOOP
  47.             IMPORT        PASCALCLIKLOOP
  48.             
  49.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  50.             
  51.             CLR.L        -(SP)                ; make space for procedure pointer
  52.             JSR            GETOLDCLIKLOOP        ; get the old clikLoop
  53.             MOVEA.L        (SP)+,A0            ; into A0
  54.             
  55.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  56.             JSR            (A0)                ; and execute old clikLoop
  57.  
  58.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  59.             JSR            PASCALCLIKLOOP        ; do our clikLoop
  60.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  61.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  62.             RTS
  63.  
  64.             END 
  65.  
  66.